/*
 * $HeadURL: $
 * $Id: $
 * Copyright (c) 2011 by Ericsson, all rights reserved.
 */

package android.test;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

/**
 *
 * @author xyonton
 * @version $Revision: $
 */
public class Welcome extends Activity {
    /** Revision of the class */
    Button   btn_back;

    TextView tv_username;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.weclome);

        Bundle bundle = this.getIntent().getExtras();
        String username = bundle.getString("username");

        tv_username = (TextView) findViewById(R.id.tvUsername);
        tv_username.setText(username);

        // Click button to go back.
        btn_back = (Button) findViewById(R.id.btnBack);
        btn_back.setOnClickListener(new Button.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(Welcome.this, HelloWorldTJITTY.class);
                startActivity(intent);
                finish();
            }
        });
    }

}
